function map(obj,id){
	$('#gmap').find('.fo').removeClass().css('background','');
	$(obj).addClass('fo').css('background',$(obj).css('background-image')+' no-repeat');
	$('#map_content').fadeOut(function(){go_map(id);});
	//$('#loading').animate({'left':267,opacity:1},300,function(){go_map(id);})
	
}

function go_map(id){
	
	$.ajax({
		type: 'get',
		url: '/index.php/life/get_map/id/'+id,
		beforeSend: function(XMLHttpRequest){
			//ShowLoading();
		},
		success: function(data, textStatus){
			//$('#loading').animate({'left':0,opacity:0},300,function(){$('#loading').css('left',538)})
			$('#map_content').html(data).fadeIn();
		},
		
		complete: function(XMLHttpRequest, textStatus){
			//HideLoading();
		},
		error: function(){
			go_map(id);
		}
	});

}


